// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   FileServerContext.java

package com.hfstu.file.server;

import com.hfstu.file.dataaccess.service.IUploadFileService;
import com.hfstu.framework.core.utils.spring.SpringContextHolder;
import org.springframework.context.ApplicationContext;

public class FileServerContext
{

	private static ApplicationContext springContext = null;
	private static IUploadFileService uploadFileService = null;
	private static FileServerContext _instance;

	public FileServerContext()
	{
	}

	public static FileServerContext getInstance()
	{
		if (_instance == null)
			synchronized (com/hfstu/file/server/FileServerContext)
			{
				if (_instance == null)
				{
					_instance = new FileServerContext();
					_instance.init();
				}
			}
		return _instance;
	}

	public void init()
	{
		springContext = SpringContextHolder.getApplicationContext();
		uploadFileService = (IUploadFileService)SpringContextHolder.getBean("uploadFileService");
	}

	public ApplicationContext getSpringContext()
	{
		return springContext;
	}

	public IUploadFileService getUploadFileService()
	{
		return uploadFileService;
	}

}
